﻿<UserControl x:Class="EcoProIT.UserControles.View.TransportDef"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:viewModel="clr-namespace:EcoProIT.UserControles.ViewModel"
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
             xmlns:local="clr-namespace:EcoProIT.UserControles.View" mc:Ignorable="d"
d:DesignHeight="500" 
           d:DesignWidth="633" Padding="0">
    <!--<UserControl.DataContext>
        <viewModel:ResourceDefinitionModel  />
    </UserControl.DataContext>-->

    <Grid x:Name="LayoutRoot">
        <xctk:IntegerUpDown Value="{Binding Speed}" Minimum="0" Margin="162,25,0,0" HorizontalAlignment="Left" Width="74" Height="25" VerticalAlignment="Top"/>
        <Label Content="Speed (m/s)" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="83,25,0,0"/>
        <DataGrid CanUserAddRows="False" Margin="10,98,10,0"
                   ItemsSource="{Binding DistanceBetweenChildrenNodesWithNodes}"  HorizontalScrollBarVisibility="Disabled" AutoGenerateColumns="False" Height="220" VerticalAlignment="Top" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="Node" Binding="{Binding Key.ResourceModel.ProcessName, Mode=OneWay}"
                                    CanUserReorder="True" />
                <DataGridTemplateColumn Header="Length After">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <xctk:DecimalUpDown Value="{Binding Value, UpdateSourceTrigger=PropertyChanged}" > </xctk:DecimalUpDown>
                        </DataTemplate> 
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
        <xctk:DecimalUpDown Value="{Binding DistansToNode}" Minimum="0" Margin="162,67,0,0" HorizontalAlignment="Left" Width="74" Height="25" VerticalAlignment="Top"/>
        <Label Content="Length to first node (m)" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="26,67,0,0"/>
    </Grid>
</UserControl>